<style>
    .main{width: 80%;margin:0 auto;text-align: center}
    .main ul{width: 90%;margin:0 auto;text-align: center}
    h2{text-align: center;font-size: 20px}
    h2 a{margin-right: 15px;color: navy;text-decoration: none}
    h2 a:last-child{margin-right: 0px}
    h2 a:hover{color:crimson;text-decoration: underline}
    h2 a:active {color: #ff4400; }
    .current{color:darkgreen}
    .info{text-align: right;max-width: 545px;margin: 0 auto;font-size: 14px;color: gray}
</style>
    <h1>会员注册管理系统</h1>
<!--判断是否登录-->
<?php
if (isset($_SESSION['loggedUsername']) && $_SESSION['loggedUsername']){?>
<div class="info"> 欢迎 <?php echo $_SESSION['loggedUsername']?>, <a href="logout.php"> 注销登录</a></div>
<?php
}
$navID = $_GET['navID'] ?? 1;
?>
    <h2>
        <a href="index.php?navID=1" <?php if ($navID == 1){echo 'class="current"';} ?>>回到首页</a>
        <a href="reg.php?navID=2" <?php if ($navID == 2){echo 'class="current"';} ?>>会员注册</a>
        <a href="login.php?navID=3" <?php if ($navID == 3){echo 'class="current"';} ?>>会员登录</a>
        <a href="#" <?php if ($navID == 4){echo 'class="current"';} ?>>资料修改</a>
        <a href="#" <?php if ($navID == 5){echo 'class="current"';} ?>>后台管理</a>
    </h2>
//25.11.28
